import React from 'react';
import { connect } from 'umi';
import { Card } from 'antd';

import '../common/style.less';
import { getCalibrateSchemas } from '../mconfig';

import ScrollBarLayout from '@/components/ScrollBarLayout';
import pageStyles from '@/common/pageLayout.less';
import { CollapseForm, useCollapseForm } from '@/components/CollapseForm';

const SourceBidderUpdateView: React.FC<ApplyUpdateAPI.IUpdateView> = ({ locationProps, curRes }) => {
  const [register] = useCollapseForm({
    schemas: getCalibrateSchemas(),
    name: 'source-calibrate',
  });

  return (
    <Card
      title={'中标公告'}
      className={pageStyles['page-view-cardView']}
      bodyStyle={{
        padding: '5px 0px',
      }}
    >
      <ScrollBarLayout>
        <CollapseForm register={register} />
      </ScrollBarLayout>
    </Card>
  );
};
export default connect(({ baseLogin, navTab }: Record<string, any>) => ({
  curRes: baseLogin?.permissions,
  navTab,
}))(SourceBidderUpdateView);
